home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 128 29
/
q29.d81
/
t.list tamer
< prev
next >
Wrap
Text File
|
2022-08-28
|
5KB
|
103 lines
Z E R O P A G E: LOADSTAR'S LISTING TAMER
Program and Text by Bob Markland
Programmers' utilities are born of absolute necessity or just to handle
a particular task more efficiently. LISTING TAMER is a convenience utility
designed to create more managable hard copies of BASIC program listings.
Sure, you can use BASIC's CMD4:LIST routines, but the results are less
than ideal. If your paper isn't precisely aligned, text is printed over
page perforations. Flex the perforations a couple of times and the pages
begin falling apart. And if you've made any changes to a program
differentiating one listing from another is a factor.
LISTING TAMER solves all these problems. It prints an identifying
header and page number at the top of each page, lists a uniform number of
program lines, then skips over page perforations. With many printers you
can also use single sheet paper if you prefer.
COMPATIBILITY
-------------
LISTING TAMER is a BASIC utility for the 128. Because of hardware
differences it won't work in 64 mode. However, even though a BASIC program
written for the 64 may not run in 128 mode, it can nonetheless be loaded
and listed successfully.
The utility will work with any printer/interface combination that
responds to OPEN4,4,0:CMD4:LIST and recognizes a one byte FORM FEED
[CHR$(12)]. You may have to flip your interface's DIP switch for LINEFEED
ON/OFF, depending upon your hardware configuration. Also, if you prefer
your printout to be in lowercase, use OPEN4,4,7:CMD4:LIST.
USING LISTING TAMER
-------------------
LISTING TAMER works equally well from both the 40- and 80-column
screens. The differences are sensed automatically and no intervention is
required.
To produce a hard copy of a BASIC program in memory. BOOT"LISTING
TAMER" from disk each time you wish to print a listing. Or you can use
BLOAD or the JiffyDOS (%) command then SYS5888. If the program you are
working with is written entirely in BASIC and does not make any use of the
free RAM at 5888-7167 ($1700-$1BFF) you may not have to BOOT"LISTING TAMER"
each time you print a listing. A simple SYS5888 will do once it's in
memory.
The first prompt asks how many program lines to print on each page. To
accept the default (40) press RETURN on the blank line. Two factors will
affect your choice: If you utilize the full 160 character line capability
of the 128, each program line will require two printer lines to list,
limiting you to as few as 20-25 program lines per page. On the other hand,
if your program lines occupy a single line on the 80 column screen and
don't contain a large number of color and cursor control characters, 50
program lines per page is appropriate.
Unfortunately, there are no absolutes when listing a program. Upon
encountering cursor control or color symbols some interfaces automatically
convert them into words (e.g. [UP], [DOWN], [BLUE], etc.). An 80 character
BASIC program line may thus require more than one printer line. By
printing 40 or fewer program lines then sending a FORM FEED proper page
formatting is retained.
On rare occasions a program may contain a series of lines packed with
control characters which, when expanded will corrupt the page formatting.
Good programming techniques go a long way toward eliminating many such
problems. Replace a line containing 17 cursor DOWN and 15 cursor RIGHT
characters with CHAR,15,17:. If you can set your interface to print
Commodore characters instead of words, you may want to do so, thus
minimizing potential problems. Otherwise, you may have to select fewer
lines per page and print the listing again.
The second prompt asks for the page header information. Enter 1 to 38
characters with a CHR$ value in the range of 32 to 95 and press RETURN.
Check your printer and paper supply then press RETURN again to begin
printing. During printing, hold down the RUN/STOP key to abort. Keep in
mind that an entire page may already be in the printer's buffer, so
printing may not stop immediately.
In the interests of simplicity and compactness, LISTING TAMER assumes
two things: 1) That there is a BASIC program currently in memory. 2) That
a printer is connected, on line, and loaded with paper. Failing this,
LISTING TAMER may crash and/or lock up the keyboard.
LISTING TAMER lists the entire program from beginning to end. When
listing only a portion of a program formatting is unnecessary. A range of
lines may be specified using the standard CMD4:LISTxxxx-xxxx commands.
Because this is a programmers' utility, intended for use with a program
of your own, it should be stored on your favorite utility disk for ease of
use while you are programming. The program isn't called from LOADSTAR and
doesn't return to LOADSTAR.
\\\\\ RETURN - Menu \\\\\